﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrafficLab
{
    class RoadSection
    {
        // Constant data.
        private String Name;
        private Intersection StartInter;
        private Intersection EndInter;


        // Adminicle data.
        private double RoadTraveltime = 0.0;
        private double volume = 0.0;


        public Intersection GetStartNode()
        {
            return this.StartInter;
        }

        public Intersection GetEndNode()
        {
            return this.EndInter;
        }


        public void SetTravelTime(double travelTime)
        {
            this.RoadTraveltime = travelTime;
        }

        public double GetTravelTime()
        {
            return this.RoadTraveltime;
        }

        public String GetName()
        {
            return this.Name;
        }

        public void SetNodes(Intersection istart, Intersection iend)
        {
            this.StartInter = istart;
            this.EndInter = iend;
        }

        public void SetVolume(double dvolume)
        {
            this.volume = dvolume;
        }

        public double GetVolume()
        {
            return this.volume;
        }

        public RoadSection(String sName)
        {
            this.Name = sName;
        }
    }
}
